Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a new set of firmware update status messages #272

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joshk
Copy link
Contributor

@joshk joshk commented Feb 8, 2025

These new accepted Hub messages hook deeper into the updating lifecycle, as well as fixing issues where new firmware aren't sent to devices when an update is ignored or encounters errors.

This also moves the responsibility for rescheduling the update to Hub, which will resend the update shortly after the date sent by Link.

The new states sent to hub are:

  • :updating (the progress is sent with this message)
  • :finalizing (the download and applying of the update has finished and the device is about to reboot)
  • :ignored (the device doesn't want the update. We could also allow a 'reason' to be sent)
  • :reschedule (including the datetime to block device updates until)
  • :error (something went wrong, a reason is also sent)

Two things to discuss/consider:

  • I've changed the finalizing push to send a reply from hub, which allows us to make sure hub knows we are about to reboot, and thus track if a device updated by never came back online. I think, for consistency, we make all pushes to firmware_update_status return replies of :ok, and then its up to Link to decide if it cares about them or not.
  • FWUP can send out info and warning messages (eg. https://github.com/nerves-project/nerves_system_rpi0/blob/main/fwup.conf#L292), but they are captured as 'warnings'. We could also send these up to Hub for extra data on how the update is going.

Some bits to track

  • Update Hub to accept these messages (I have a changeset ready but we first need to merge in the new orchestrator)
  • Test with some devices

@joshk joshk force-pushed the new-update-status-messages branch 3 times, most recently from efd488f to b496601 Compare February 8, 2025 09:14
These new accepted Hub messages hook deeper into the updating lifecycle, as well as fixing issues where new firmware aren't sent to devices when an update is ignored or encounters errors.

This also moves the responsibility for rescheduling the update to Hub, which will resend the update shortly after the date sent by Link.
@joshk joshk force-pushed the new-update-status-messages branch from b496601 to 349d4e7 Compare February 9, 2025 01:41
@joshk joshk changed the title Use the new firmware update status messages Support a new set of firmware update status messages Feb 9, 2025
@joshk joshk requested a review from jjcarstens February 9, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant